home *** CD-ROM | disk | FTP | other *** search
/ Power Bytes: Money & Finance / PowerBytes Money and Finance CD-ROM 01 / PowerBytes Money and Finance CD-ROM 01.iso / New Files / Batch DL < prev    next >
Encoding:
Text File  |  1988-12-07  |  3.1 KB  |  94 lines  |  [TEXT/EDIT]

  1.  Settings File = GEnie
  2.  Script Name = Batch DL
  3.  Command Key = 
  4.  F-key = 
  5.  Menu = NO
  6.  Button = NO
  7.  
  8. 1   If Expression  "=(EXISTS(online)=false) or (online=false)"
  9. 2     Do Script * " Log On"
  10. 3     When Text Equals  ">elp?"
  11. 4     Or When Seconds Have Passed  "=100"
  12. 5       Do Script * "Timeout Error"
  13. 6     End When
  14. 7   End If
  15. 8   Set Variable SkipLine from Expression  "=0"
  16. 9   Set Variable EOF from Expression  "=0"
  17. 10  Send File * Text Line by Line  "DL Files List"
  18. 11  Set Variable FileNumber from File Line  
  19. 12  If Failure 
  20. 13    Do Script * "Set DL List"
  21. 14    Set Variable FileNumber from File Line  
  22. 15  End If
  23. 16  Send Text String  "m 606^M"
  24. 17  When Text Equals  ">elp?"
  25. 18    Send Text String  "6^M"
  26. 19  Or When Seconds Have Passed  "=60"
  27. 20    Do Script * "Timeout Error"
  28. 21  End When
  29. 22  Repeat
  30. 23    Set Variable SkipLine from Expression  "=SkipLine+1"
  31. 24    When Text Equals  "elp?"
  32. 25      Send Text String  "=FileNumber,'^M'"
  33. 26    Or When Seconds Have Passed  "=60"
  34. 27      Do Script * "Timeout Error"
  35. 28    End When
  36. 29    When Text Equals  "(Y/N)?"
  37. 30      Remark "Bypass bad file numbers"
  38. 31      Set Variable PerfectDL from Expression  "=false"
  39. 32    Or When Line Contains  "<Q>uit."
  40. 33      When Text Equals  "?"
  41. 34        Send Text String  "d^M"
  42. 35      Or When Seconds Have Passed  "=60"
  43. 36        Do Script * "Timeout Error"
  44. 37      End When
  45. 38      When Text Equals  "skip?"
  46. 39        Send Text String  "2^M"
  47. 40        When Line Contains  "receive file"
  48. 41          Set Variable theTick from Expression  "=TICKCOUNT"
  49. 42          Set Variable theFile from Expression  "='GEnie Text DL - ',theTick"
  50. 43          Receive File * XMODEM MacBinary  "=theFile"
  51. 44          Send File * Text Line by Line  "DL Files List"
  52. 45          Set Variable Kount from Expression  "=0"
  53. 46          Repeat
  54. 47            Set Variable FileNumber from File Line  
  55. 48            Set Variable Kount from Expression  "=Kount+1"
  56. 49          Until Expression  "=Kount = SkipLine"
  57. 50        Or When Seconds Have Passed  "=60"
  58. 51          Do Script * "Timeout Error"
  59. 52        End When
  60. 53      Or When Seconds Have Passed  "=60"
  61. 54        Do Script * "Timeout Error"
  62. 55      End When
  63. 56    Or When Seconds Have Passed  "=60"
  64. 57      Do Script * "Timeout Error"
  65. 58    End When
  66. 59    Set Variable FileNumber from File Line  
  67. 60    If Failure 
  68. 61      Remark "Must be end of file, so logoff and leave script"
  69. 62      Set Variable EOF from Expression  "=1"
  70. 63      When Text Equals  "(Y/N)?"
  71. 64        Send Text String  "n^M"
  72. 65      Or When Seconds Have Passed  "=60"
  73. 66        Do Script * "Timeout Error"
  74. 67      End When
  75. 68      Wait Seconds  "1"
  76. 69      When Text Equals  ">elp?"
  77. 70        Do Script * "Log Off"
  78. 71      Or When Seconds Have Passed  "=60"
  79. 72        Do Script * "Timeout Error"
  80. 73      End When
  81. 74    Else
  82. 75      When Text Equals  "(Y/N)?"
  83. 76        Send Text String  "y^M"
  84. 77      Or When Seconds Have Passed  "=60"
  85. 78        Do Script * "Timeout Error"
  86. 79      End When
  87. 80    End If
  88. 81  Until Expression  "=(EOF=1)"
  89. 82  Do Script * "Reset DL List"
  90. 83  Dialog Discard  
  91. 84  Dialog Install  ""Finished Batch Download""
  92. 85  Wait Seconds  "=10"
  93. 86  Dialog Discard  
  94.